package com.eastseeway.radioproject.base;

public class Const {
    public static final long TIME_10_MIN = 1000*60*10;
    public static final long TIME_1_MIN = 1000*60;

    public static final String MACHINE_TYPE_TAISHI = "MACHINE_TYPE_TAISHI";
    public static final String MACHINE_TYPE_LISHI = "MACHINE_TYPE_LISHI";

//    ===========================================地址相关 START================================================
    public static final int ADDRESS_LOCALHOST = 0x110;
//    手柄1  data1是正常控制参数；data2是标定参数；data3是采样参数(曲线)
    public static final int ADDRESS_FROM_HANDLE_1_DATA_1 = 0x120;
    public static final int ADDRESS_TO_HANDLE_1_DATA_CALIBRATION = 0x021;//手柄1 -> 主控板
    public static final int ADDRESS_TO_HANDLE_1_DATA_1 = 0x020;
    public static final int ADDRESS_FIRMWARE_HANDLE_1_SET = 0x128;
    public static final int ADDRESS_FIRMWARE_HANDLE_1_DATA = 0x129;
    public static final int ADDRESS_FROM_HANDLE_1_DATA_3 = 0x122;//手柄1 -> 主控板

//    手柄2  data1是正常控制参数；data2是标定参数；data3是采样参数
    public static final int ADDRESS_FROM_HANDLE_2_DATA_1 = 0x130;
    public static final int ADDRESS_TO_HANDLE_2_DATA_CALIBRATION = 0x031;//手柄1 -> 主控板
    public static final int ADDRESS_TO_HANDLE_2_DATA_1 = 0x030;
    public static final int ADDRESS_FIRMWARE_HANDLE_2_SET = 0x138;
    public static final int ADDRESS_FIRMWARE_HANDLE_2_DATA = 0x139;
    public static final int ADDRESS_FROM_HANDLE_2_DATA_3 = 0x132;// 手柄2 -> 主控板

//    底板
    public static final int ADDRESS_FROM_BOTTOM_BOARD = 0x160;
    public static final int ADDRESS_TO_BOTTOM_BOARD = 0x060;
    public static final int ADDRESS_FIRMWARE_BOTTOM_SET = 0x168;
    public static final int ADDRESS_FIRMWARE_BOTTOM_DATA = 0x169;
//    底板固件版本回应地址
    public static final int ADDRESS_VERSION_INFO_FROM_BOTTOM_BOARD = 0x161;

//    负压板
    public static final int ADDRESS_FROM_NEGATIVE_PRESSURE_BOARD = 0x150;
    public static final int ADDRESS_TO_NEGATIVE_PRESSURE_BOARD = 0x050;
    //    负压板固件更新地址
    public static final int ADDRESS_FIRMWARE_NEGATIVE_PRESSURE_SET = 0x158;
    public static final int ADDRESS_FIRMWARE_NEGATIVE_PRESSURE_DATA = 0x159;
//    负压板固件版本请求和回应地址
    public static final int ADDRESS_VERSION_INFO_FROM_NEGATIVE_PRESSURE = 0x151;
    public static final int ADDRESS_VERSION_INFO_TO_NEGATIVE_PRESSURE = 0x051;

//    能量板
    public static final int ADDRESS_TO_ENERGY_BOARD = 0x148;
    public static final int ADDRESS_FROM_ENERGY_BOARD = 0x140;
    //    能量板固件更新 todo
    public static final int ADDRESS_FIRMWARE_ENERGY_SET = 0x888;
    public static final int ADDRESS_FIRMWARE_ENERGY_DATA = 0x889;


//    手柄切换板
    public static final int ADDRESS_FROM_SWITCH_BOARD = 0x170;
    public static final int ADDRESS_TO_SWITCH_BOARD = 0x070;
//    切换板更新固件
    public static final int ADDRESS_FIRMWARE_SWITCH_BOARD_SET = 0x178;
    public static final int ADDRESS_FIRMWARE_SWITCH_BOARD_DATA = 0x179;
//    切换板固件版本请求和回应地址
    public static final int ADDRESS_VERSION_INFO_FROM_SWITCH_BOARD = 0x171;
    public static final int ADDRESS_VERSION_INFO_TO_SWITCH_BOARD = 0x071;

//    自动校准地址
    public static final int ADDRESS_FROM_AUTO_CALIBRATION = 0x175;
    public static final int ADDRESS_TO_AUTO_CALIBRATION = 0x176;


//    ===========================================SP相关 START================================================

    //    记录机器注册 首次开机时间的key
    public static final String SPKEY_FIRMWARE_VERSION_INFO = "SPKEY_FIRMWARE_VERSION_INFO";
    //    记录仪器当前的状态 1：正常工作；  2：升级中
    public static final String SPKEY_SYSTEM_IS_UPGRADING = "SPKEY_SYSTEM_IS_UPGRADE";

//    记录累计时长的key
    public static final String SPKEY_WORK_HOURS = "SPKEY_WORK_HOURS";
    //    记录仪器唯一id的key
    public static final String SPKEY_DEVICE_ID = "SPKEY_DEVICE_ID";

    public static final String SPKEY_DEVICE_INFO = "SPKEY_DEVICE_INFO";

    //    记录当前登录用户信息的key
    public static final String SPKEY_CURRENT_USER = "SPKEY_CURRENT_USER";

    //    记录位置信息的key
    public static final String SPKEY_ADDRESS = "SPKEY_ADDRESS";

//      TCP状态本地保存状态
    public static final String SPKEY_TCP_CONNECT_STATUS = "SPKEY_TCP_CONNECT_STATUS";

//    保存手柄端请求的压力和VBus电压
    public static final String SPKEY_REQUEST_PRESSURE = "SPKEY_REQUEST_PRESSURE";
    public static final String SPKEY_VBUS_VOLTAGE = "SPKEY_VBUS_VOLTAGE";

//    保存各个部分的版本信息
    public static final String SPKEY_VERSION_INFO = "SPKEY_VERSION_INFO";

//    保存机器类型
    public static final String SPKEY_MACHINE_TYPE = "SPKEY_MACHINE_TYPE";

//    保存手柄端压力值的偏移量
    public static final String SPKEY_PRESSURE_OFFSET = "SPKEY_PRESSURE_OFFSET";

//    =====================================TCP==========================================
//    public static final String TCP_SERVER_IP = "192.168.60.10";
    public static final int TCP_SERVER_PORT = 8000;
    //    TCP通信的帧长度
    public static final short STANDARD_FRAME_LENGTH = 80;
//    TCP通信帧中，数据的长度
    public static final int STANDARD_DATA_LENGTH = 64;
    public static final Integer TCP_CONNECT_STATUS = 90 ;

//    =====================================MQ START==========================================
    public static final String MQ_HTTP_TYPE ="" ;
//    public  static String MQ_ADDRESS = "182.40.198.213";
    public  static final String MQ_USERNAME = "ylsb";
    public  static final String MQ_PASSWORD = "ylsb";
    public  static final String MQ_VIRTUAL_HOST = "ylDevice";
    public  static final String MQ_EXCHANGE_NAME = "jeecg.direct.exchange";
    public  static final String MQ_QUEUE_NAME = "device.parameter";
    public  static final String MQ_ROUTING_KEY = "device.realdata";
    public  static final int MQ_PORT= 5672;


    //    =====================================OTHERS==========================================
    public static final String[] CALIBRATION_DATA = {"0620","0877","1075","1241","1387","1520","1641","1755","1861","1962",
                                                     "2058","2149","2237","2321","2403","2482","2558","2632","2704","2775",
                                                     "2843","2910","2975","3039","3102","3163","3224","3283","3341","3398",
                                                     "3454","3510","3564","3618","3670","3722","3774","3824","3874","3923",
                                                     "3972","4020","4068","4115","4162","4208","4253","4298","4343","4387",};
//    记录上次操作时使用的参数的位置
    public static final int POSITION_PREVIOUS_PARAMS = 6;
//    手柄连接状态
    public static final int EVENTBUS_HANDLE_STATE = 10001;
//    蓝牙传来的固件
    public static final int EVENTBUS_FIRMWARE_FROM_BLUETOOTH = 10002;
//    日志保存的最长实践
    public static final long MAX_TIME = 1000L * 60 * 60 * 24 * 60; // two days



}
